package com.game.primitive;

import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by Administrator on 2016/7/21.
 */
public class Main {
	public static void main(String[] args) {
		Map<Integer, Integer> battlefieldMap = new ConcurrentHashMap<Integer, Integer>();
		for (int i = 0; i < 100; i++) {
			battlefieldMap.put(i,i);
		}
		Iterator<Integer> iterator = battlefieldMap.values().iterator();
		while (iterator.hasNext()) {
			Integer next = iterator.next();
			if (next % 5 == 0) {
				//iterator.remove();
			}
		}
		for (Integer integer : battlefieldMap.values()) {
			if (integer % 5 == 0) {
				battlefieldMap.remove(integer);
				continue;
			}
			System.out.println(integer);
		}
	}
}
